package com.bcxj.apipassenger.remote;

import com.bcxj.internalcommon.dto.*;
import com.bcxj.internalcommon.response.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * ClassName: ServiceRouteplan
 * Package: com.bcxj.apipassenger.remote
 * Description:
 *
 * @Author BCXJ
 * @Create 2025/3/1 11:48
 * @Version 1.0
 * @Since 1.0
 */
@FeignClient("service-routeplan")
public interface ServiceRoutePlanClient {

    /**
     * 步行方式
     * @param depLongitude
     * @param depLatitude
     * @param destLongitude
     * @param destLatitude
     * @return
     */
    @GetMapping("/direction/walking")
    public ResponseResult walk(            @RequestParam("depLongitude") String depLongitude,
                                           @RequestParam("depLatitude") String depLatitude,
                                           @RequestParam("destLongitude") String destLongitude,
                                           @RequestParam("destLatitude") String destLatitude);


    /**
     * 调用接口获取驾车的路径规划
     * @param depLongitude
     * @param depLatitude
     * @param destLongitude
     * @param destLatitude
     * @return
     */
    @GetMapping("/direction/driving")
    public ResponseResult drivering( @RequestParam("depLongitude") String depLongitude,
                                     @RequestParam("depLatitude") String depLatitude,
                                     @RequestParam("destLongitude") String destLongitude,
                                     @RequestParam("destLatitude") String destLatitude,
                                     @RequestParam("strategy") String strategy
    );


    /**
     * 调用接口实现公共交通的路径规划信息
     * @param depLongitude
     * @param depLatitude
     * @param destLongitude
     * @param destLatitude
     * @param depCity
     * @param destCity
     * @param strategy
     * @return
     */
    @GetMapping("/direction/public-transit")
    public ResponseResult publicTransport(@RequestParam("depLongitude") String depLongitude,
                                          @RequestParam("depLatitude") String depLatitude,
                                          @RequestParam("destLongitude") String destLongitude,
                                          @RequestParam("destLatitude") String destLatitude,
                                          @RequestParam("depCity") String depCity,
                                          @RequestParam("destCity") String destCity,
                                          @RequestParam("strategy") String strategy);


    /**
     * 骑行的数据路径规划
     * @param depLongitude
     * @param depLatitude
     * @param destLongitude
     * @param destLatitude
     * @return
     */
    @GetMapping("/direction/bicycle")
    public ResponseResult bicycle(@RequestParam("depLongitude") String depLongitude,
                                  @RequestParam("depLatitude") String depLatitude,
                                  @RequestParam("destLongitude") String destLongitude,
                                  @RequestParam("destLatitude") String destLatitude);


    /**
     * 增添历史出行数据
     * @param recordDTO
     * @return
     */
    @PostMapping("/routerecord/add")
    public ResponseResult addRecord(@RequestBody RouteRecordDTO recordDTO);

    /**
     * 查询用户的历史出行记录
     * @param userId
     * @return
     */
    @GetMapping("/routerecord/list")
    ResponseResult list(@RequestParam("userId") Long userId);

    @PostMapping("/direction/recommend")
    //ResponseResult recommend(Long userId, String depLongitude, String depLatitude, String destLongitude, String destLatitude);
    ResponseResult recommend(@RequestBody DirectionRecommendDTO directionRecommendDTO);
}
